/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NewJPanel.java
 *
 * Created on 11 ก.พ. 2553, 15:30:18
 */

package warehouse;

/**
 *
 * @author Poko
 */
public class PnlEditPr extends javax.swing.JPanel {

    /** Creates new form NewJPanel */
    public PnlEditPr() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadPr = new javax.swing.JPanel();
        lblHeadEditPr = new javax.swing.JLabel();
        btnPrEditSave = new javax.swing.JButton();
        btnPrEditCancel = new javax.swing.JButton();
        btnPrEditDel = new javax.swing.JButton();
        btnPrPrint = new javax.swing.JButton();
        pnlEditPr = new javax.swing.JPanel();
        lblPrCode = new javax.swing.JLabel();
        txtPrCode = new javax.swing.JTextField();
        txtPrDateRe = new javax.swing.JTextField();
        lblPrDateRe = new javax.swing.JLabel();
        txtPrRequest = new javax.swing.JTextField();
        lblPrRequest = new javax.swing.JLabel();
        lblProName = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblEditPr = new javax.swing.JTable();
        btnPrSearchPro = new javax.swing.JButton();
        lblListEm = new javax.swing.JLabel();
        txtEmCode = new javax.swing.JTextField();
        lblTypePro = new javax.swing.JLabel();
        cmbTypeCode = new javax.swing.JComboBox();
        lblProCode = new javax.swing.JLabel();
        txtProCode = new javax.swing.JTextField();
        lblProDeBa1 = new javax.swing.JLabel();
        txtProDeBa1 = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));

        pnlHeadPr.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadPr.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlHeadPr.setMinimumSize(new java.awt.Dimension(700, 80));

        lblHeadEditPr.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadEditPr.setText("การขอซื้อ");

        btnPrEditSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/save_30x30.gif"))); // NOI18N

        btnPrEditCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel_30x30.gif"))); // NOI18N

        btnPrEditDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N

        btnPrPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnPrPrint.setMaximumSize(new java.awt.Dimension(65, 40));
        btnPrPrint.setMinimumSize(new java.awt.Dimension(65, 40));
        btnPrPrint.setPreferredSize(new java.awt.Dimension(65, 40));

        javax.swing.GroupLayout pnlHeadPrLayout = new javax.swing.GroupLayout(pnlHeadPr);
        pnlHeadPr.setLayout(pnlHeadPrLayout);
        pnlHeadPrLayout.setHorizontalGroup(
            pnlHeadPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadPrLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblHeadEditPr)
                    .addGroup(pnlHeadPrLayout.createSequentialGroup()
                        .addGap(0, 0, 0)
                        .addComponent(btnPrEditSave, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPrEditCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPrEditDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(btnPrPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(489, Short.MAX_VALUE))
        );
        pnlHeadPrLayout.setVerticalGroup(
            pnlHeadPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadPrLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(lblHeadEditPr)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlHeadPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnPrPrint, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addGroup(pnlHeadPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(btnPrEditSave, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                        .addComponent(btnPrEditCancel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                        .addComponent(btnPrEditDel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        lblPrCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPrCode.setText("รหัสใบขอซื้อ :");

        txtPrCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtPrDateRe.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblPrDateRe.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPrDateRe.setText("วันที่ต้องการสินค้า :");

        txtPrRequest.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblPrRequest.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPrRequest.setText("วันที่ขอซื้อ :");

        lblProName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProName.setText("รายการสินค้า :");

        tblEditPr.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblEditPr.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "รหัสสินค้า", "รายการสินค้า", "จำนวนสินค้า", "ราคา/หน่วย", "หน่วย"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, true, true, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblEditPr);

        btnPrSearchPro.setFont(new java.awt.Font("Tahoma", 0, 12));
        btnPrSearchPro.setText("ค้นหารายการสินค้า");
        btnPrSearchPro.setMaximumSize(new java.awt.Dimension(150, 30));
        btnPrSearchPro.setMinimumSize(new java.awt.Dimension(150, 30));
        btnPrSearchPro.setPreferredSize(new java.awt.Dimension(150, 30));
        btnPrSearchPro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPrSearchProActionPerformed(evt);
            }
        });

        lblListEm.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblListEm.setText("รหัสพนักงาน :");

        txtEmCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEmCode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmCodeActionPerformed(evt);
            }
        });

        lblTypePro.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblTypePro.setText("ประเภทสินค้า :");

        cmbTypeCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblProCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProCode.setText("รหัสสินค้า :");

        txtProCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblProDeBa1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblProDeBa1.setText("จำนวนสินค้าที่ต้องการ :");

        txtProDeBa1.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtProDeBa1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtProDeBa1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlEditPrLayout = new javax.swing.GroupLayout(pnlEditPr);
        pnlEditPr.setLayout(pnlEditPrLayout);
        pnlEditPrLayout.setHorizontalGroup(
            pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditPrLayout.createSequentialGroup()
                .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEditPrLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblPrDateRe, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblPrCode, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblTypePro, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProDeBa1, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtProDeBa1)
                            .addComponent(txtPrCode)
                            .addComponent(txtPrDateRe)
                            .addComponent(cmbTypeCode, 0, 167, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblPrRequest)
                            .addComponent(lblProCode)
                            .addComponent(lblProName)
                            .addComponent(lblListEm))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnPrSearchPro, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(txtProCode)
                                .addComponent(txtPrRequest)
                                .addComponent(txtEmCode, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE))))
                    .addGroup(pnlEditPrLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 681, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(20, Short.MAX_VALUE))
        );
        pnlEditPrLayout.setVerticalGroup(
            pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditPrLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEditPrLayout.createSequentialGroup()
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblPrCode)
                            .addComponent(txtPrCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtPrDateRe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblPrDateRe))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTypePro)
                            .addComponent(cmbTypeCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlEditPrLayout.createSequentialGroup()
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblPrRequest)
                            .addComponent(txtPrRequest, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlEditPrLayout.createSequentialGroup()
                                .addGap(27, 27, 27)
                                .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblProCode, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtProCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txtEmCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(lblListEm)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEditPrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblProDeBa1)
                        .addComponent(txtProDeBa1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblProName)
                    .addComponent(btnPrSearchPro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(71, 71, 71))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 700, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(pnlHeadPr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(pnlEditPr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(0, 0, Short.MAX_VALUE)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 508, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(pnlHeadPr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlEditPr, javax.swing.GroupLayout.PREFERRED_SIZE, 420, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btnPrSearchProActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrSearchProActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_btnPrSearchProActionPerformed

    private void txtEmCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEmCodeActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtEmCodeActionPerformed

    private void txtProDeBa1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtProDeBa1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtProDeBa1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnPrEditCancel;
    private javax.swing.JButton btnPrEditDel;
    private javax.swing.JButton btnPrEditSave;
    private javax.swing.JButton btnPrPrint;
    private javax.swing.JButton btnPrSearchPro;
    private javax.swing.JComboBox cmbTypeCode;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblHeadEditPr;
    private javax.swing.JLabel lblListEm;
    private javax.swing.JLabel lblPrCode;
    private javax.swing.JLabel lblPrDateRe;
    private javax.swing.JLabel lblPrRequest;
    private javax.swing.JLabel lblProCode;
    private javax.swing.JLabel lblProDeBa1;
    private javax.swing.JLabel lblProName;
    private javax.swing.JLabel lblTypePro;
    private javax.swing.JPanel pnlEditPr;
    private javax.swing.JPanel pnlHeadPr;
    private javax.swing.JTable tblEditPr;
    private javax.swing.JTextField txtEmCode;
    private javax.swing.JTextField txtPrCode;
    private javax.swing.JTextField txtPrDateRe;
    private javax.swing.JTextField txtPrRequest;
    private javax.swing.JTextField txtProCode;
    private javax.swing.JTextField txtProDeBa1;
    // End of variables declaration//GEN-END:variables

}
